package com.yungu.swift.order.service;

import com.yungu.swift.base.ResponseData;
import com.yungu.swift.order.model.vo.PayVo;

import java.util.Map;

/**
 * Copyright © 厦门云谷互联信息有限公司 2018-2020 All Right Reserved
 * <p>
 * 支付业务逻辑接口
 *
 * @author Zerrion
 * @version 1.0.0-RELEASE
 * @since 2018-07-05 10:29
 */
public interface PayService {
    /**
     * 预支付
     * <p>
     *
     * <p>
     *
     * @return
     */
    ResponseData<Map<String, String>> trade(PayVo payVo);

    /**
     * 第三方回调
     *
     * @param payType 交易类型
     * @param map     通知参数
     * @return AjaxList
     */
    ResponseData<String> tradeCallback(int payType, Map<String, String> map);

    /**
     * 第三方回调
     *
     * @param orderUuid 订单uuid
     * @param userUuid  用户uuid
     * @return AjaxList
     */
    ResponseData<String> invokeCallback(String orderUuid, String userUuid);

    /**
     * 出租车收取现金方法
     *
     * @param orderUuid  订单uuid
     * @param uploadText uploadText
     * @return AjaxList
     */
    ResponseData<Boolean> receiveCash(String orderUuid, String uploadText);

    /**
     * 确认预支付是否成功
     *
     * @param orderUuid 订单uuid
     * @return AjaxList
     */
    ResponseData<Boolean> checkPay(String orderUuid);

    /**
     * 清除服务端支付缓存
     *
     * @param orderUuid
     * @return
     */
    ResponseData<Void> removePayCache(String orderUuid);

    /**
     * 数据修复
     *
     * @param serialNumber
     * @return
     */
    ResponseData<Boolean> repairData(String serialNumber);
}
